home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1984 January to June
/
Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64
/
locate cursor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
612b
|
27 lines
0 rem--ahoy--feb issue--crsrloc--prog page69
5 rem << crsrloc - locate cursor >>
10 rem <<listing 1 -9/9/83>>
20 rem use kernal routine 'plot' to read the cursor's position
30 print chr$(147) :rem clear screen
40 rem store machine language in memory
50 sa = 49168 :rem starting address
60 x=0
70 read b
80 if b=-1 then 130
90 poke sa+x,b
95 print sa+x,b
100 x=x+1
110 goto 70
120 data 0,0,56,32,240,255,142,16,192,140,17,192,96,-1
130 rem--------------------------------
140 rem find out where cursor is now
150 gosub 200
160 print row;col
170 print tab(20):gosub 200
180 print row;col
190 end
200 sys sa+2: rem get cursor location
210 row=peek(sa)
220 col=peek(sa+1)
230 return